var KenDon = function(){};

KenDon.Delegate = function(){
  var D = function(p){D.r(p);}
  with({d:D}){
    d.isDelegate = true;
    d.arr = [];
    d.add = function(f){ d.arr.push(f);};
    d.r = function(p){
        var arr = d.arr;
        var length = arr.length;
        for(var i=0; i<length; i++){ arr[i](p); }
    };
    clear = function(){d.arr = [];};
  }
  return D;
};
KenDon.is_delegate = function(p){
  return typeof(p) == 'function' && typeof(p.isDelegate) && p.isDelegate === true?true:false;
};

KenDon.is_array = function(p){
    return ((typeof p=== 'object' && typeof p.sort === 'function' && typeof p.length === 'number')?true:false);
};

KenDon.bluePrint = function(){};

KenDon.prototype.setting = function(p){
  for(member in p){
  (member in this)&&(KenDon.is_delegate(this[member]) && (KenDon.is_array(p[member]) && (function(member,p){for(var i=0, member_length = p.length; i<member_length;i++){this[member].add(p[i]);}}.apply(this, [member,p[member]] ),true)||(this[member].add(p[member]),true))||(this[member] = p[member],true))||(this.config[member]=p[member],true);
  }
};
KenDon.prototype.config = [];
